package com.example.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @program: zhugelongchen
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-13 19:47
 **/
@Component
@Aspect

public class LogAdvice {
    @Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
    private void logAdvice(){}

    @Before("logAdvice()")
    public void before(){
        System.out.println("添加getTest的前置日志");
    }

}
